package com.jstyle.jclife.activity;

import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import com.airbnb.lottie.LottieAnimationView;
import com.jstyle.jclife.R;
import com.jstyle.jclife.fragment.LoginFragment;
import butterknife.BindView;
import butterknife.ButterKnife;

public class LoginActivity extends BaseActivity {

    @BindView(R.id.FrameLayout)
    android.widget.FrameLayout FrameLayout;
    @BindView(R.id.lottieAnimationView)
    LottieAnimationView lottieAnimationView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.activity_login);
        ButterKnife.bind(this);
        lottieAnimationView.setAnimation("434-gradient-animated-background.json");
        lottieAnimationView.loop(true);
        lottieAnimationView.playAnimation();
        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction().add(R.id.FrameLayout, new LoginFragment()).commit();
        }
    }
}
